﻿<?php session_start();
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax Auto Suggest</title>
<script type="text/javascript" src="autocomplete/jquery.js"></script>
<script type='text/javascript' src='autocomplete/jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="autocomplete/jquery.autocomplete.css" />

<script type="text/javascript">function opcion(){
 var t= (document.f.opt_asiento.value.toLowerCase());
alert (t);
var url="busca_rec.php?t="+t;
window.open(url, '', 'scrollbars=no, status=no, toolbar=no, directories=no, menubar=no, resizable=no, width=1px, height=1px, left=600, top=200 ');
}

</script>
<script type="text/javascript">

//var t = document.getElementById('opt_asiento').value;
$(document).ready(function() {
var direccion="Fun_Jquery.php?t=";
var fin="'";

	$("#na").autocomplete(direccion, {
		width: 345,
		selectFirst: false
	});
	});
<?php $SESSION['T']=null;?>
</script>
</head>

<body>

	<form id="f" name ="f">
	
	<label>Pertenece a:</label>
	<select name='opt_asiento' id="opt_asiento" onChange="opcion()">
	<option value="0"> Seleccione</option>
	<option value="a"> Cooperativa</option>
	<option value="b"> Grupo</option>
	<option value="c"> Otro</option>
</select>
	<br>
    Type your county:
	<br>
	<input name="na" type="text" id="na"/>
	</form>

</body>
</html>

